<template>
	<view class="index">
		<block >
			<div class="row">
				<div class="card card-list2" v-for="(site, index) in sites" :key="index" @click="goDetail(site)">
					<image class="card-img card-list2-img" :src="site.icon"></image>
					<div class="card-bottm row">
						<div class="car-title-view row">
							<text class="card-title card-list2-title">{{site.name}}</text>
						</div>
					</div>
				</div>
			</div>
		</block>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				sites:{
					'iqyi':{
						'url':'http://m.iqiyi.com/',
						'name':'爱奇艺',
						'icon':'/static/site/iqiyi.jpg',
						'type':'iqyi'
					},
					'qq':{
						'url':'https://m.v.qq.com/index.html',
						'name':'腾讯视频',
						'icon':'/static/site/qq.jpg',
						'type':'qq'
					},
					'youku':{
						'url':'https://www.youku.com/',
						'name':'优酷视频',
						'icon':'/static/site/youku.jpg',
						'type':'youku'
					}
				}
			};
		},
		methods:{
			goDetail(e) {
				uni.navigateTo({
					url: "../index/detail?site=" + JSON.stringify(e)
				})
			},
		}
	}
</script>

<style>

</style>
